```html
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Spring Boot 定时任务指南</title>
    <link href="https://cdn.staticfile.org/font-awesome/6.4.0/css/all.min.css" rel="stylesheet">
    <link href="https://cdn.staticfile.org/tailwindcss/2.2.19/tailwind.min.css" rel="stylesheet">
    <link href="https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;500;600;700&family=Noto+Sans+SC:wght@300;400;500;700&display=swap" rel="stylesheet">
    <script src="https://cdn.jsdelivr.net/npm/mermaid@latest/dist/mermaid.min.js"></script>
    <style>
        body {
            font-family: 'Noto Sans SC', Tahoma, Arial, Roboto, "Droid Sans", "Helvetica Neue", "Droid Sans Fallback", "Heiti SC", "Hiragino Sans GB", Simsun, sans-serif;
            line-height: 1.6;
            color: #333;
        }
        h1, h2, h3, h4 {
            font-family: 'Noto Serif SC', serif;
            font-weight: 600;
        }
        .hero-gradient {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        }
        .code-block {
            background: #282c34;
            border-radius: 8px;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        }
        .card-hover {
            transition: all 0.3s ease;
        }
        .card-hover:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
        }
        .section-divider {
            border-top: 1px solid #e2e8f0;
        }
    </style>
</head>
<body class="bg-gray-50">
    <!-- Hero Section -->
    <section class="hero-gradient text-white py-20 px-4">
        <div class="max-w-4xl mx-auto text-center">
            <div class="inline-block bg-white bg-opacity-20 rounded-full p-3 mb-6">
                <i class="fas fa-clock text-3xl"></i>
            </div>
            <h1 class="text-4xl md:text-5xl font-bold mb-4">Spring Boot 定时任务完全指南</h1>
            <p class="text-xl md:text-2xl opacity-90 mb-8">掌握 @Scheduled 注解，轻松实现自动化任务调度</p>
            <div class="flex justify-center space-x-4">
                <a href="#getting-started" class="bg-white text-indigo-700 px-6 py-3 rounded-lg font-medium hover:bg-opacity-90 transition">开始学习</a>
                <a href="#examples" class="bg-indigo-800 text-white px-6 py-3 rounded-lg font-medium hover:bg-indigo-700 transition">查看示例</a>
            </div>
        </div>
    </section>

    <!-- Main Content -->
    <main class="max-w-4xl mx-auto px-4 py-12">
        <!-- Introduction -->
        <section id="getting-started" class="mb-16">
            <div class="flex items-center mb-6">
                <div class="bg-indigo-100 w-8 h-8 rounded-full flex items-center justify-center mr-3">
                    <i class="fas fa-rocket text-indigo-600"></i>
                </div>
                <h2 class="text-2xl font-bold">快速入门</h2>
            </div>
            <p class="text-lg mb-6">在 Spring Boot 中实现定时任务非常简单，主要通过使用 <code class="bg-gray-100 px-2 py-1 rounded">@Scheduled</code> 注解来配置和管理任务。</p>
            
            <div class="grid md:grid-cols-2 gap-8 mb-12">
                <div class="card-hover bg-white p-6 rounded-xl shadow-md">
                    <div class="flex items-center mb-4">
                        <div class="bg-blue-100 w-10 h-10 rounded-full flex items-center justify-center mr-3">
                            <i class="fas fa-cog text-blue-600"></i>
                        </div>
                        <h3 class="text-xl font-semibold">核心优势</h3>
                    </div>
                    <ul class="space-y-3">
                        <li class="flex items-start">
                            <i class="fas fa-check-circle text-green-500 mt-1 mr-2"></i>
                            <span>简单易用的注解驱动</span>
                        </li>
                        <li class="flex items-start">
                            <i class="fas fa-check-circle text-green-500 mt-1 mr-2"></i>
                            <span>多种调度策略可选</span>
                        </li>
                        <li class="flex items-start">
                            <i class="fas fa-check-circle text-green-500 mt-1 mr-2"></i>
                            <span>与 Spring 生态无缝集成</span>
                        </li>
                    </ul>
                </div>
                
                <div class="card-hover bg-white p-6 rounded-xl shadow-md">
                    <div class="flex items-center mb-4">
                        <div class="bg-purple-100 w-10 h-10 rounded-full flex items-center justify-center mr-3">
                            <i class="fas fa-lightbulb text-purple-600"></i>
                        </div>
                        <h3 class="text-xl font-semibold">适用场景</h3>
                    </div>
                    <ul class="space-y-3">
                        <li class="flex items-start">
                            <i class="fas fa-database text-indigo-500 mt-1 mr-2"></i>
                            <span>数据同步与备份</span>
                        </li>
                        <li class="flex items-start">
                            <i class="fas fa-chart-line text-indigo-500 mt-1 mr-2"></i>
                            <span>定时报表生成</span>
                        </li>
                        <li class="flex items-start">
                            <i class="fas fa-bell text-indigo-500 mt-1 mr-2"></i>
                            <span>系统监控与告警</span>
                        </li>
                    </ul>
                </div>
            </div>
        </section>

        <div class="section-divider my-12"></div>

        <!-- Step-by-Step Guide -->
        <section class="mb-16">
            <div class="flex items-center mb-6">
                <div class="bg-indigo-100 w-8 h-8 rounded-full flex items-center justify-center mr-3">
                    <i class="fas fa-list-ol text-indigo-600"></i>
                </div>
                <h2 class="text-2xl font-bold">实现步骤</h2>
            </div>

            <!-- Step 1 -->
            <div class="mb-12">
                <div class="flex items-center mb-4">
                    <div class="bg-white border-2 border-indigo-500 w-8 h-8 rounded-full flex items-center justify-center mr-3 text-indigo-600 font-bold">1</div>
                    <h3 class="text-xl font-semibold">添加依赖</h3>
                </div>
                <p class="mb-4">确保你的项目中包含了 Spring Boot 的基础依赖。如果你使用的是 Maven，<code class="bg-gray-100 px-2 py-1 rounded">spring-boot-starter</code> 已经默认包含了所需的依赖。</p>
                
                <div class="code-block p-4 mb-6">
                    <pre class="text-gray-200"><code>&lt;dependency&gt;
    &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
    &lt;artifactId&gt;spring-boot-starter&lt;/artifactId&gt;
&lt;/dependency&gt;</code></pre>
                </div>
            </div>

            <!-- Step 2 -->
            <div class="mb-12">
                <div class="flex items-center mb-4">
                    <div class="bg-white border-2 border-indigo-500 w-8 h-8 rounded-full flex items-center justify-center mr-3 text-indigo-600 font-bold">2</div>
                    <h3 class="text-xl font-semibold">启用定时任务支持</h3>
                </div>
                <p class="mb-4">在你的 Spring Boot 应用程序主类或配置类上使用 <code class="bg-gray-100 px-2 py-1 rounded">@EnableScheduling</code> 注解来启用定时任务功能。</p>
                
                <div class="code-block p-4 mb-6">
                    <pre class="text-gray-200"><code>import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.scheduling.annotation.EnableScheduling;

@SpringBootApplication
@EnableScheduling
public class DemoApplication {
    public static void main(String[] args) {
        SpringApplication.run(DemoApplication.class, args);
    }
}</code></pre>
                </div>
            </div>

            <!-- Step 3 -->
            <div class="mb-12">
                <div class="flex items-center mb-4">
                    <div class="bg-white border-2 border-indigo-500 w-8 h-8 rounded-full flex items-center justify-center mr-3 text-indigo-600 font-bold">3</div>
                    <h3 class="text-xl font-semibold">创建定时任务</h3>
                </div>
                <p class="mb-4">使用 <code class="bg-gray-100 px-2 py-1 rounded">@Scheduled</code> 注解在你的方法上定义一个定时任务。</p>
                
                <div class="code-block p-4 mb-6">
                    <pre class="text-gray-200"><code>import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
public class ScheduledTasks {

    // 每隔5秒执行一次
    @Scheduled(fixedRate = 5000)
    public void scheduleTaskWithFixedRate() {
        System.out.println("定时任务 - 固定速率执行: " + System.currentTimeMillis() / 1000);
    }

    // 每隔10秒执行一次，上次任务执行完成后等待10秒再执行
    @Scheduled(fixedDelay = 10000)
    public void scheduleTaskWithFixedDelay() {
        System.out.println("定时任务 - 固定延迟执行: " + System.currentTimeMillis() / 1000);
    }

    // 第一次延迟2秒后执行，之后每隔5秒执行一次
    @Scheduled(initialDelay = 2000, fixedRate = 5000)
    public void scheduleTaskWithInitialDelay() {
        System.out.println("定时任务 - 延迟后固定速率执行: " + System.currentTimeMillis() / 1000);
    }

    // 使用Cron表达式，每分钟的第10秒执行一次
    @Scheduled(cron = "10 * * * * *")
    public void scheduleTaskWithCronExpression() {
        System.out.println("定时任务 - 使用Cron表达式: " + System.currentTimeMillis() / 1000);
    }
}</code></pre>
                </div>
            </div>
        </section>

        <div class="section-divider my-12"></div>

        <!-- Task Types -->
        <section id="examples" class="mb-16">
            <div class="flex items-center mb-6">
                <div class="bg-indigo-100 w-8 h-8 rounded-full flex items-center justify-center mr-3">
                    <i class="fas fa-tasks text-indigo-600"></i>
                </div>
                <h2 class="text-2xl font-bold">定时任务的类型</h2>
            </div>
            
            <div class="grid md:grid-cols-2 gap-6">
                <div class="card-hover bg-white p-6 rounded-xl shadow-md">
                    <div class="flex items-center mb-3">
                        <div class="bg-blue-100 w-8 h-8 rounded-full flex items-center justify-center mr-3">
                            <i class="fas fa-bolt text-blue-600"></i>
                        </div>
                        <h3 class="text-lg font-semibold">fixedRate</h3>
                    </div>
                    <p class="text-gray-700">按固定速率执行，任务之间的间隔时间是任务开始时的间隔时间。</p>
                </div>
                
                <div class="card-hover bg-white p-6 rounded-xl shadow-md">
                    <div class="flex items-center mb-3">
                        <div class="bg-green-100 w-8 h-8 rounded-full flex items-center justify-center mr-3">
                            <i class="fas fa-stopwatch text-green-600"></i>
                        </div>
                        <h3 class="text-lg font-semibold">fixedDelay</h3>
                    </div>
                    <p class="text-gray-700">按固定延迟执行，任务之间的间隔时间是任务结束时的间隔时间。</p>
                </div>
                
                <div class="card-hover bg-white p-6 rounded-xl shadow-md">
                    <div class="flex items-center mb-3">
                        <div class="bg-yellow-100 w-8 h-8 rounded-full flex items-center justify-center mr-3">
                            <i class="fas fa-hourglass-start text-yellow-600"></i>
                        </div>
                        <h3 class="text-lg font-semibold">initialDelay</h3>
                    </div>
                    <p class="text-gray-700">第一次任务执行的延迟时间，通常与 <code>fixedRate</code> 或 <code>fixedDelay</code> 配合使用。</p>
                </div>
                
                <div class="card-hover bg-white p-6 rounded-xl shadow-md">
                    <div class="flex items-center mb-3">
                        <div class="bg-purple-100 w-8 h-8 rounded-full flex items-center justify-center mr-3">
                            <i class="fas fa-calendar-alt text-purple-600"></i>
                        </div>
                        <h3 class="text-lg font-semibold">cron</h3>
                    </div>
                    <p class="text-gray-700">使用 Cron 表达式来定义复杂的任务调度。</p>
                </div>
            </div>
        </section>

        <div class="section-divider my-12"></div>

        <!-- Cron Expression Guide -->
        <section class="mb-16">
            <div class="flex items-center mb-6">
                <div class="bg-indigo-100 w-8 h-8 rounded-full flex items-center justify-center mr-3">
                    <i class="fas fa-keyboard text-indigo-600"></i>
                </div>
                <h2 class="text-2xl font-bold">Cron 表达式简介</h2>
            </div>
            
            <p class="mb-6">Cron 表达式的格式为 <code class="bg-gray-100 px-2 py-1 rounded">"秒 分 小时 天 月 星期 [年]"</code>，例如：</p>
            
            <div class="bg-white rounded-xl shadow-md overflow-hidden mb-8">
                <table class="min-w-full divide-y divide-gray-200">
                    <thead class="bg-gray-50">
                        <tr>
                            <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">表达式</th>
                            <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">说明</th>
                        </tr>
                    </thead>
                    <tbody class="bg-white divide-y divide-gray-200">
                        <tr>
                            <td class="px-6 py-4 whitespace-nowrap text-sm font-mono text-indigo-600">"0 0 12 * * ?"</td>
                            <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-700">每天中午12点触发</td>
                        </tr>
                        <tr>
                            <td class="px-6 py-4 whitespace-nowrap text-sm font-mono text-indigo-600">"0 15 10 ? * *"</td>
                            <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-700">每天上午10:15触发</td>
                        </tr>
                        <tr>
                            <td class="px-6 py-4 whitespace-nowrap text-sm font-mono text-indigo-600">"0 15 10 * * ? 2024"</td>
                            <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-700">2024年每天上午10:15触发</td>
                        </tr>
                    </tbody>
                </table>
            </div>
            
            <div class="bg-blue-50 border-l-4 border-blue-400 p-4 mb-8">
                <div class="flex">
                    <div class="flex-shrink-0">
                        <i class="fas fa-info-circle text-blue-400"></i>
                    </div>
                    <div class="ml-3">
                        <p class="text-sm text-blue-700">
                            Cron 表达式中的特殊字符: <br>
                            <span class="font-mono">*</span> 表示匹配任意值 <br>
                            <span class="font-mono">?</span> 表示不指定值（仅用于日和星期字段） <br>
                            <span class="font-mono">-</span> 表示范围 <br>
                            <span class="font-mono">,</span> 表示列举多个值 <br>
                            <span class="font-mono">/</span> 表示步长
                        </p>
                    </div>
                </div>
            </div>
        </section>

        <div class="section-divider my-12"></div>

        <!-- Visualization -->
        <section class="mb-16">
            <div class="flex items-center mb-6">
                <div class="bg-indigo-100 w-8 h-8 rounded-full flex items-center justify-center mr-3">
                    <i class="fas fa-project-diagram text-indigo-600"></i>
                </div>
                <h2 class="text-2xl font-bold">定时任务类型可视化</h2>
            </div>
            
            <div class="bg-white p-6 rounded-xl shadow-md">
                <div class="mermaid">
                    flowchart TD
                    A[定时任务类型] --> B[fixedRate\n固定速率]
                    A --> C[fixedDelay\n固定延迟]
                    A --> D[initialDelay\n初始延迟]
                    A --> E[cron\nCron表达式]
                    
                    B -->|下次执行\n不等待上次完成| F[任务1开始]
                    F --> G[任务1结束]
                    B -->|固定间隔| H[任务2开始]
                    
                    C -->|等待上次完成\n再延迟固定时间| I[任务1开始]
                    I --> J[任务1结束]
                    J -->|固定延迟| K[任务2开始]
                    
                    D -->|首次延迟| L[延迟时间]
                    L --> M[开始周期性执行]
                    
                    E --> N[秒 分 时 日 月 周]
                    N --> O[复杂调度]
                </div>
            </div>
        </section>

        <div class="section-divider my-12"></div>

        <!-- Advanced Configuration -->
        <section class="mb-16">
            <div class="flex items-center mb-6">
                <div class="bg-indigo-100 w-8 h-8 rounded-full flex items-center justify-center mr-3">
                    <i class="fas fa-cogs text-indigo-600"></i>
                </div>
                <h2 class="text-2xl font-bold">高级配置</h2>
            </div>
            
            <p class="mb-6">你可以通过 <code class="bg-gray-100 px-2 py-1 rounded">@Scheduled</code> 注解结合 Spring 配置来调整定时任务的线程池大小、异常处理、任务并行执行等更多高级功能。</p>
            
            <div class="grid md:grid-cols-2 gap-6">
                <div class="card-hover bg-white p-6 rounded-xl shadow-md">
                    <h3 class="text-lg font-semibold mb-3">配置线程池</h3>
                    <div class="code-block p-4">
                        <pre class="text-gray-200"><code>@Configuration
@EnableScheduling
public class SchedulerConfig implements SchedulingConfigurer {
    @Override
    public void configureTasks(
        ScheduledTaskRegistrar taskRegistrar) {
        taskRegistrar.setScheduler(
            Executors.newScheduledThreadPool(5)
        );
    }
}</code></pre>
                    </div>
                </div>
                
                <div class="card-hover bg-white p-6 rounded-xl shadow-md">
                    <h3 class="text-lg font-semibold mb-3">异常处理</h3>
                    <div class="code-block p-4">
                        <pre class="text-gray-200"><code>@Scheduled(fixedRate = 5000)
public void taskWithExceptionHandling() {
    try {
        // 任务逻辑
    } catch (Exception e) {
        // 异常处理逻辑
        log.error("定时任务执行失败", e);
    }
}</code></pre>
                    </div>
                </div>
            </div>
        </section>
    </main>

    <!-- Footer -->
    <footer class="bg-gray-900 text-gray-300 py-8">
        <div class="max-w-4xl mx-auto px-4 text-center">
            <div class="flex justify-center space-x-4 mb-4">
                <a href="#" class="hover:text-white transition">
                    <i class="fab fa-github text-xl"></i>
                </a>
                <a href="#" class="hover:text-white transition">
                    <i class="fab fa-twitter text-xl"></i>
                </a>
                <a href="#" class="hover:text-white transition">
                    <i class="fab fa-linkedin text-xl"></i>
                </a>
            </div>
            <p class="text-sm mb-2">技术小馆</p>
            <a href="http://www.yuque.com/jtostring" class="text-indigo-400 hover:text-indigo-300 text-sm transition">http://www.yuque.com/jtostring</a>
        </div>
    </footer>

    <script>
        mermaid.initialize({
            startOnLoad: true,
            theme: 'default',
            flowchart: {
                useMaxWidth: true,
                htmlLabels: true,
                curve: 'basis'
            }
        });
        
        // 平滑滚动
        document.querySelectorAll('a[href^="#"]').forEach(anchor => {
            anchor.addEventListener('click', function (e) {
                e.preventDefault();
                document.querySelector(this.getAttribute('href')).scrollIntoView({
                    behavior: 'smooth'
                });
            });
        });
    </script>
</body>
</html>
```